<iframe th:replace="common/top.html" width="100%" frameborder="0" scrolling="yes" class="x-iframe"></iframe>
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>订单状态</title>
    <link rel="StyleSheet" href="css/orderstatus.css" type="text/css" media="screen"/>
</head>
<body>
<h1>订单状态</h1>
<div th:if="${message}" th:text="${message}"
     style="color:red;text-align:center;"></div>>
 <div style="text-align: center">
     <form th:action="@{/orderstatus/searchorderstatus}" method="get">
         <input type="text" name="str" placeholder="查看订单状态" required>
         <select name="method">
             <option value="id">订单编号</option>
             <option value="date">日期</option>
         </select>
         <input type="submit" class="button">
     </form>
<!--    <form th:action="@{/orderstatus/searchorderstatus}" method="get">-->
<!--        <input type="text" name="str" placeholder="查看订单状态" required>-->
<!--        <select name="method">-->
<!--            <option value="id">订单编号</option>-->
<!--        </select>-->
<!--        <input type="submit" class="button">-->
<!--    </form>-->

    <table class="table">
        <thead>
        <tr>
            <th>订单编号</th>
            <th>行号</th>
            <th>时间戳</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="orderStatus : ${orderstatuses}">
            <td th:text="${orderStatus.orderId}"></td>
            <td th:text="${orderStatus.lineNum}"></td>
            <td th:text="${orderStatus.timeStamp}"></td>
            <td th:text="${orderStatus.status}"></td>
            <td>
                <a th:href="@{/orderstatus/sendoutstatus(id=${orderStatus.orderId})}">发货</a>
                <a th:href="@{/orderstatus/deleteorderstatus(id=${orderStatus.orderId})}">删除</a>
            </td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>
